//
//  BigScrollView.m
//  ITHome
//
//  Created by lanou3g on 15/7/18.
//  Copyright (c) 2015年 YAX. All rights reserved.
//

#import "BigScrollView.h"

@implementation BigScrollView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self getScrollView];
    }
    return self;
}

- (void)getScrollView
{
    self.scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)];
    self.scrollView.scrollsToTop = NO;
    self.scrollView.contentSize = CGSizeMake(kScreenWidth * 2, kScreenHeight - 64 - 49);
    self.scrollView.pagingEnabled = YES;
    self.scrollView.showsHorizontalScrollIndicator = NO;
    self.scrollView.showsVerticalScrollIndicator = NO;
    self.scrollView.bounces = NO;
    [self addSubview:_scrollView];
    [self addTableView];
}

- (void)addTableView
{
    self.videoTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight - 64 - 49) style:UITableViewStylePlain];
    self.videoTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    [self.scrollView addSubview:_videoTableView];

    
    self.jokeTableView = [[UITableView alloc] initWithFrame:CGRectMake(kScreenWidth, 0, kScreenWidth, kScreenHeight - 64 - 49) style:UITableViewStylePlain];
    
    [self.scrollView addSubview:_jokeTableView];
}

@end
